import request from "/src/axios.js";
import {baseUrl} from "../../config/env";

export const toolDataSourceApi = {
  getList: (current, size, params) => request({
    url: baseUrl + "/ops-develop/datasource/list",
    method: "get",
    params: {
      ...params,
      current,
      size,
    },
  }),
  getDetail: (id) => request({
    url: baseUrl + "/ops-develop/datasource/detail",
    method: "get",
    params: {
      id,
    },
  }),

  remove: (ids) => request({
    url: baseUrl + "/ops-develop/datasource/remove",
    method: "post",
    params: {
      ids,
    },
  }),
  add: (row) => request({
    url: baseUrl + "/ops-develop/datasource/submit",
    method: "post",
    data: row,
  }),
  update: (row) => request({
    url: baseUrl + "/ops-develop/datasource/submit",
    method: "post",
    data: row,
  })
}
